package god;

import java.util.Scanner;

public class J09Retangle {
	public static void main(String[] args) {
		
		double area[] = new double[2], perimeter[] = new double[2];
		double width[] = new double[2], height[] = new double[2];
		String color[] = new String[2];
		
		// 면적, 둘레 계산
		inputRetangle(width, height, color);
		getArea(area, width, height);
		getPerimeter(perimeter, width, height);
		
		System.out.println(width[1]);
		System.out.println(height[1]);
		System.out.println(area[1]);
		System.out.println(perimeter[1]);
		System.out.println(color[1]);
	
	}
	// 사각형의 가로, 세로, 색깔 입력
	public static void inputRetangle(double width[], double height[], String color[]) {
		Scanner sc = new Scanner(System.in);
			System.out.println("가로를 입력해주세요.");
			width[1] = sc.nextInt();
			System.out.println("세로를 입력해주세요.");
			height[1] = sc.nextInt();
			System.out.println("색깔을 입력해주세요.");
			color[1] = sc.next();
		sc.close();
	}
	public static void getArea(double area[], double width[], double height[]) {
		area[1] = width[1] * height[1];
	}
	
	public static void getPerimeter(double perimeter[], double width[], double height[]) {
		perimeter[1] = (width[1] + height[1]) * 2;
	}

}
